<template>
  <div>父组件{{ count }}</div>
  <el-button @click="add()">hah</el-button>
  <Children :count="count"></Children>
</template>
<script setup lang="ts">
import Children from "@/components/Children/index.vue";
import { onUpdated, onBeforeUpdate, ref } from "vue";
const count = ref(0);
onBeforeUpdate(() => {
  console.log("父组件更新了 前");
});
onUpdated(() => {
  console.log("父组件更新了");
});
console.log("asdfas");
const add = () => {
  count.value++;
};
</script>
<style scoped lang="scss"></style>
